home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
misc
/
pbill33b.lha
/
Phonebill
/
Install Phonebill
next >
Wrap
Text File
|
1995-06-17
|
10KB
|
345 lines
;** Yo Emacs, this looks like a -*- lisp -*- file
;**
;** $VER: Install-Phonebill 3.3b (17.06.95)
;**
;** Install script for phonebill
;**
;** Copyright © 1994 Raymond Penners
;** All rights reserved
;**
(if (< (/ (getversion) 65536) 37)
(abort wrongkickstart)
)
;**
;** Ask user where to place `phonebill' and setup dir/file vars accordingly
;**
(complete 0)
(set pbilldest
(askdir
(prompt "Select where to install `phonebill'\nA directory "Phonebill" will be created automatically")
(help @askdir-help)
(default @default-dest)
)
)
(set pbilldir (tackon pbilldest "Phonebill"))
(set @default-dest pbilldir)
(set docdir (tackon pbilldir "Documentation"))
(set configdir (tackon pbilldir "Config"))
(set ratesfile (tackon configdir "Rates.config"))
(set catalogdir (tackon pbilldir "Catalogs"))
(set oldvernum 0)
;**
;** Create directory/Check if there is already a copy installed
;**
(complete 10)
(set extype (exists pbilldir))
(if (= extype 1) (abort "There already exists a file named \"phonebill\""))
(if (= extype 2)
(
(if (exists (tackon pbilldir "phonebill"))
(
(set oldvernum (getversion (tackon pbilldir "Phonebill")))
(message
(cat "A copy of `phonebill' already exists. "
"If you proceed, this copy will be updated. Certain files "
"will be overwritten."
)
)
)
)
)
(makedir pbilldir (infos))
)
(makedir docdir (infos))
(makedir configdir (infos))
(makedir catalogdir)
(set oldver (/ oldvernum 65536))
(set oldrev (- oldvernum (* oldver 65536) ) )
;**
;** Install executable and library
;**
(complete 20)
(copylib
(help @copylib-help)
(prompt "Installing gtlayout.library\nCopyright © 1990-1994 Olaf Barthel")
(confirm)
(source "Libs/gtlayout.library")
(dest "LIBS:")
)
(complete 30)
(copyfiles
(help @copyfiles-help)
(source "Phonebill")
(dest pbilldir)
(prompt "Installing the executable program")
(confirm)
(infos)
)
;**
;** Install documentation
;**
(complete 40)
(set docchoice
(askoptions
(prompt "There are three formats available for the documentation.")
(choices "AmigaGuide Format (required for online help)"
"TeX DVI Format (for printed manuals)"
"Plain ASCII Format")
(help @askoptions-help)
)
)
(if (<> 0 (BITAND docchoice 1))
(
(copyfiles
(prompt "Installing AmigaGuide manual...")
(source "Documentation/Phonebill.guide")
(dest docdir)
(help @copyfiles-help)
(infos)
)
)
)
(complete 50)
(if (<> 0 (BITAND docchoice 2))
(
(copyfiles
(prompt "Installing DVI manual...")
(source "Documentation/Phonebill.DVI")
(dest docdir)
(help @copyfiles-help)
(infos)
)
)
)
(complete 60)
(if (<> 0 (BITAND docchoice 4))
(
(copyfiles
(prompt "Installing ASCII manual...")
(source "Documentation/Phonebill.doc")
(dest docdir)
(help @copyfiles-help)
(infos)
)
)
)
(complete 65)
(copyfiles
(prompt "Installing registration forms...")
(source "Documentation")
(dest docdir)
(pattern "Register#?")
(infos)
(help @copyfiles-help)
)
(complete 70)
;**
;** Configuration files
;**
(complete 80)
(set installedcfg 0)
(if (exists "envarc:phonebill/phonebill.prefs")
(
(if (= 1 (askbool(prompt (cat "Old (pre 3.0) `phonebill' configuration files have been found in \"ENV:\" and \"ENVARC:\". "
"Starting from release 3.0, the configuration files "
"have changed from IFF format to plain ASCII text files. "
"Do you want to update these configuration files for use "
"with this release, or do you want to use "
"the default configuration files ?"
)
)
(help @askbool-help)
(choices "Update configuration" "Default configuration")
)
)
(
(working "Updating configuration")
(run "Extras/UpdateConfig2.x")
(copyfiles
(help @copyfiles-help)
(prompt "Installing the updated configuration files")
(source "T:")
(dest configdir)
(pattern "#?.config")
(confirm)
)
(set installedcfg 1)
)
)
(if (= 1 (askbool (prompt "The files in \"ENV:\" and \"ENVARC:\" are no longer needed. Do you want to remove them?")
(help @askbool-help)
)
)
(
(working "Removing `phonebill' related files from \"ENV:\" and \"ENVARC:\"")
(run "delete env:phonebill all")
(run "delete envarc:phonebill all")
)
)
)
)
(complete 90)
(if (= installedcfg 0)
(if (and (= oldver 3) (= oldrev 0))
(
(message "The configuration needs to be updated for use with this release of `phonebill'.")
(working "Updating configuration")
(run ("Extras/UpdateConfig3.0 \"%s\"" configdir))
(copyfiles
(help @copyfiles-help)
(prompt "Installing the updated configuration files")
(source "T:")
(dest configdir)
(pattern "#?.config")
(confirm)
)
)
(
(if (= 0 (exists (tackon configdir "Host.config")))
(copyfiles (source "Config/Host.config") (dest configdir))
)
(if (= 0 (exists (tackon configdir "Misc.config")))
(copyfiles (source "Config/Misc.config") (dest configdir))
)
(if (= 0 (exists (tackon configdir "Logs.config")))
(copyfiles (source "Config/Logs.config") (dest configdir))
)
(if (= 0 (exists (tackon configdir "Presets.config")))
(copyfiles (source "Config/Presets.config") (dest configdir))
)
(set updaterates 1)
(if (= 1 (exists ratesfile))
(set updaterates
(askbool
(prompt "A \"Rates.config\" file already exists. If you didn't modify "
"these rates yourself, you might want to update the rates "
"with the one supplied with this version."
)
(choices "Install new rates" "Do not modify rates")
(help @askbool-help)
)
)
)
(if (= 1 updaterates)
(
(set ratechoice
(askoptions
(prompt "Select the countries whose rates you wish to install:")
(choices "Belgium"
"Deutschland"
"France"
"Italy"
"Nederland"
"Norge"
"Sverige"
)
(help @askoptions-help)
)
)
(run ("echo \"\" >\"%s\"" ratesfile))
(if (<> 0 (BITAND ratechoice 1))
(run ("type %s >>\"%s\"" "Config/Rates.config.belgium" ratesfile))
)
(if (<> 0 (BITAND ratechoice 2))
(run ("type %s >>\"%s\"" "Config/Rates.config.deutschland" ratesfile))
)
(if (<> 0 (BITAND ratechoice 4))
(run ("type %s >>\"%s\"" "Config/Rates.config.france" ratesfile))
)
(if (<> 0 (BITAND ratechoice 8))
(run ("type %s >>\"%s\"" "Config/Rates.config.italy" ratesfile))
)
(if (<> 0 (BITAND ratechoice 16))
(run ("type %s >>\"%s\"" "Config/Rates.config.nederland" ratesfile))
)
(if (<> 0 (BITAND ratechoice 32))
(run ("type %s >>\"%s\"" "Config/Rates.config.norge" ratesfile))
)
(if (<> 0 (BITAND ratechoice 64))
(run ("type %s >>\"%s\"" "Config/Rates.config.sverige" ratesfile))
)
)
)
)
)
)
(copyfiles
(help @copyfiles-help)
(source "Config/Scanner.config")
(dest configdir)
(prompt "Installing scanners (\"Scanner.config\")")
(confirm)
)
;**
;** Catalog files
;**
(complete 95)
(copyfiles
(help @copyfiles-help)
(prompt "Installing catalog files")
(source "Catalogs")
(dest catalogdir)
(all)
(confirm)
)
(complete 99)
(if (exists (tackon docdir "Register.Australia"))
(delete (tackon docdir "Register.Australia")
(help @delete-help)
(infos)
(prompt (cat "Continental Drift, the Australian registration "
"is closing down. You can no longer register "
"there. The Australian registration form will be "
"deleted."))
(confirm))
)
(complete 100)
(exit)